import java.util.Scanner;

public class cartest {
    static void main() {
        car[] arr = new car[3];
        Scanner sc = new Scanner(System.in);
        for (int i = 0; i < arr.length; i++) {
            car c = new car();
            System.out.println("请输入汽车的品牌");
            String brand = sc.next();
            c.setBrand(brand);
            System.out.println("请输入汽车的价格");
            int price = sc.nextInt();
            c.setPrice(price);
            System.out.println("请输入汽车的颜色");
            String color = sc.next();
            c.setColor(color);
            arr[i] = c;
        }
        for (int i = 0; i < arr.length; i++) {
            car c = arr[i];
            System.out.println(c.getBrand() + " " + c.getPrice() + " " + c.getColor());
        }
    }
}
